 

using System;

namespace Petaframe.Logging
{
	
	public abstract class LogEntryFilter
	{
		
		private LogSeverity _severityThreshold = LogSeverity.Debug;
		
		public LogSeverity SeverityThreshold 
		{
			get { return _severityThreshold; }
			set { _severityThreshold = value; }
		}

		
		protected abstract bool CanPass( LogEntry aLogEntry );

		
		protected internal bool ShouldLog(LogEntry aLogEntry) 
		{
			return ( aLogEntry.Severity >= SeverityThreshold ) && CanPass( aLogEntry );
		}
		
		protected LogEntryFilter() : base() 
		{
		}
	}

}
